package com.itheima.controller;

import com.itheima.bean.Classes;
import com.itheima.service.ClassesService;
import com.itheima.service.impl.ClassesServiceImpl;
import org.junit.Test;

import java.util.List;

public class ClassesController {

    private ClassesService classesService = new ClassesServiceImpl();

    @Test
    public void testFindAll(){
        List<Classes> classesList = classesService.findAll();
        for (Classes classes : classesList) {
            System.out.println(classes);
        }
    }
    /*
    * 一对多查询
    * */
    @Test
    public void testFindAll2(){
        List<Classes> students = classesService.findAll();
        for (Classes classes : students) {
            System.out.println(classes);
        }

    }
}
